close all;
clear all;


[t,x] = ode45('plant', [0 10], [0.5;0;0;0;0;0;0]);

x1 = x(:,1);
x2 = x(:,2);
z0 = x(:,3);
z1 = x(:,4);
z2 = x(:,5);


figure(1);
subplot(211);
plot(t,x1,'k','linewidth',1.5);
xlabel('Time/s');ylabel('x');
legend('x1');
subplot(212);
plot(t,x2,'k','linewidth',1.5);
xlabel('Time/s');ylabel('x2');
legend('x2');


figure(3);
plot(t,z0,'g--',t,x2,'r:','linewidth',1.5);
xlabel('Time/s');ylabel('x');
legend('x2_hat','x2');

figure(4);
plot(t,z1,'g--',t,3*sin(2*pi*t),'r:','linewidth',1.5);
xlabel('Time/s');ylabel('x');
legend('d_hat','d');

figure(5);
plot(t,z2,'g--',t,2*pi*3*cos(2*pi*t),'r:','linewidth',1.5);
xlabel('Time/s');ylabel('x');
legend('dot_d_hat','dot_d');
